#ifndef __Logger_h__
#define __Logger_h__

#include <iostream>
#include <string>

namespace Greatewall
{
    namespace Interface
    {
        class Logger
        {
        public:
            enum LogLevel
            {
                ERROR,
                WARNING,
                INFO
            };

            Logger(std::ostream& stream)
                : _ostream(stream)
            {}

            ~Logger()
            {}

            virtual bool
            log(LogLevel level, std::string& logInfo) = 0;

            virtual bool
            log(LogLevel level, const char* format, ...) = 0;

            template<typename T>
            Logger&
            operator << (T& t)
            { _ostream << t; }

        protected:
            std::ostream&    _ostream;
        };
    }
}

#endif
